import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './containers/App';
// import * as serviceWorker from './serviceWorker';
import { Provider } from 'react-redux'

import store from './store/store.js';

ReactDOM.render(
  <Provider store ={store}>
    <App/>
  </Provider>,
  document.getElementById('root')
)




// // *监听store中的变化，来重新渲染页面
// store.subscribe(() => {
//   ReactDOM.render(
//     <React.StrictMode>
//       <App store={store} />
//     </React.StrictMode>,
//     document.getElementById('root')
//   );
// })

// ReactDOM.render(
//   <React.StrictMode>
//     <App store={store} />
//   </React.StrictMode>,
//   document.getElementById('root')
// );


//! 模拟Redux
// ReactDOM.render(<Test store={test2} />,document.getElementById('root'))

// serviceWorker.unregister();
